package cn.catsdad.base.web;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * 前端请求结果
 *
 * @author xuyl
 * @version 1.0 2024/7/14
 */
@Data
@Accessors(chain = true)
public class HttpResponse<T> {

    private int status;
    private String msg;
    private T data;
    private int count;
    private boolean success;

    public HttpResponse(){
        this.status = IResponseStatus.SUCCESS;
        this.success = true;
        this.msg = "操作成功！";
    }

    public HttpResponse(int status, String msg, boolean success) {
        this.status = status;
        this.msg = msg;
        this.success = success;
    }
}
